/**
 * &copy; 2006 NewInstance.it
 */
package it.newinstance.jrainbow.source;


/**
 * @author Luigi R. Viggiano
 * @version $Id: TaggedString.java 154 2007-06-22 00:13:03Z luigi.viggiano $
 */
public class TaggedString {
    private String string;
    private Tag tag;
    private int startPosition;
    private int endPosition;

    public TaggedString(String string, Tag tag) {
        this.string = string;
        this.tag = tag;
    }

    public TaggedString(Tag tag) {
        this(null, tag);
    }

    public void setString(String string) {
        this.string = string;
    }
    
    public String getString() {
        return string;
    }
    
    public Tag getTag() {
        return tag;
    }    
    
    /**
     * Contextual start position inside the whole source code.
     * @param start the start position to set
     */
    public void setStartPosition(int start) {
        startPosition = start;
    }

    public int getStartPosition() {
        return startPosition;
    }

    /**
     * Contextual end position inside the whole source code.
     * TODO: never used, remove?
     */
    void setEndPosition(int end) {
        this.endPosition = end;
    }
    
    /**
     * TODO: never used, remove?
     */
    int getEndPosition() {
        return endPosition;
    }
}
